public class Demo {
    public static void main(String[] args) {
       /* int a = 5;
        System.out.println(a);
        method01(a);
        System.out.println(a);*/

        long sum=0;
        long res =1;
        long mod = (long) 1e9;
        for (int i = 1; i <= 100; i++) {
            res = res * i % mod;
            sum = (sum + res) % mod;
            System.out.println(sum);
        }



    }

    /*public static void method01(int a){
        a = 6;
    }*/
}
